package com.primus.server.entity.user;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.collect.Lists;
import com.primus.server.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.util.List;

@Setter
@Getter
@Entity
public class User extends BaseEntity {

    private String name;

    private String account;

    private String phone;

    private String password;

    private String weChatCode;

    private String aliPayCode;

    private String token;

    private String sex;

    private String birth;

    private String qrCode;

    private String avatar;

    private String state;

    @ManyToMany(fetch = FetchType.LAZY)
    @JsonIgnore
    private List<Role> roles = Lists.newArrayList();

}
